<%@page contentType="text/html; charset=utf-8" %>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>书籍管理</title>
	<script type="text/javascript" src="js/jquery.js" charset="gb2312"></script>
  	<script type="text/javascript" src="js/date.js" charset="gb2312"></script>
  	<script type="text/javascript" src="js/book.js" charset="gb2312"></script> 
	<link rel="stylesheet" type="text/css" href="css/all.css" />
</head>
<body>
<div id="main">
	<div id="header" >
		<a href="index.html" class="logo"><img src="img/logo.gif" width="101" height="29" alt="" /></a>
		<ul id="top-navigation">
			<li><span><span><a href="adminBook!toAdminBookList.action">已借书籍</a></span></span></li>
			<li class="active"><span><span>未借书籍</span></span></li>
		</ul>
	</div>
	<div id="middle">
		<br/>
		  <div align="right" >
		    <input type="text" name="book.bookname" align="right"/>
			<input type="button" onclick="query2()" value="查询"  align="right"/>
		  </div>
		  <br />
		  <br />
			<div class="table">
				<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
				<img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
				<form action="adminBook!toStockBookList.action" method="post" name="bookAdminForm">
				<table class="listing" cellpadding="0" cellspacing="0">
					<tr>
						<th class="first">书目编号</th>
						<th>书名</th>
						<th>所属类别</th>
						<th>删除书籍</th>
						<th>修改书籍</th>
						<th>添加书籍</th>
						<%--<th class="last">Head</th>
					--%>
					</tr>
					<s:if test="#request.SPB.size()==0">
					<tr>
						<td colspan="20"
							style="text-align: center; height: 40px;">
							暂时还没有记录
						</td>
					</tr>
				</s:if>
				<s:else>
					<s:iterator value="#request.SPB.datas" status="status" id="adminbook">
					<tr>
						<td class="first style1"><%--
							${sessionScope.BOOK.bookid}
							--%><s:property value="bookid"/>
						</td>
						<td><s:property value="bookname"/></td>
						<td><s:property value="bookkind"/></td>
						<td>
							<img src="img/hr.gif" onclick="del(${adminbook.bookid},'${adminbook.bookname}')" width="16" height="16" alt="" />
						</td>
						<td>
							<img src="img/edit-icon.gif" width="16" height="16" alt=""/>
						</td>
						<td class="last">
							<a href="adminBook!toAdd.action">
								<img src="img/add-icon.gif" width="16" height="16" alt="" />
							</a>
						</td>
					</tr>
					</s:iterator>
					<tr>
						<th colspan="100" class="pager">

							<div class="pager">
                                <pg:pager url="adminBook!toStockBookList.action" maxPageItems="4" maxIndexPages="6" items="${requestScope.SPB.total}" export="currentPageNumber=pageNumber">
									<pg:first> 
										<a href="${pageUrl}">首页</a>
									</pg:first>
									<pg:prev>
										<a href="${pageUrl}">上一页</a>
									</pg:prev>
									
									<pg:pages>
										<s:if test="#attr.currentPageNumber==#attr.pageNumber">
											<font color="red">${pageNumber}</font>
										</s:if>
										<s:else>
											<a href="${pageUrl}">${pageNumber }</a>
										</s:else>
										
										
									</pg:pages>
									
									<pg:next>
										<a href="${pageUrl}">下一页</a>
									</pg:next>
									<pg:last>
										<a href="${pageUrl}">尾页</a>
									</pg:last>
								</pg:pager>
								
							</div>
						</th>
					</tr>		
				</s:else>
				</table>
				</form>
			</div>
	</div>
	</div>
</body>
</html>

